const express = require('express');
const router = express.Router();
const photoController = require('../controllers/photoController');
const authenticate = require('../middleware/auth');

// 上传照片 (需要认证)
router.post('/upload', authenticate, photoController.upload, photoController.uploadPhoto);

// 获取照片信息
router.get('/:id', photoController.getPhoto);

// 获取用户的所有照片 (需要认证)
router.get('/user/:userId', authenticate, photoController.getUserPhotos);

module.exports = router;